$(document).ready(function ()
{
    setTimeout(function(){location.reload(true)}, 60000);

    $('#chart_ccu').highcharts(
    {
        chart:
        {
            type: 'line'
        },
        title:
        {
            text: 'CCU',
            x: -30
        },
        xAxis:
        {
            type: 'datetime',
            dateTimeLabelFormats:
            {
                hour: '%H:00'
            }
        },
        yAxis:
        {
            min: 0,
            allowDecimals: false,
            title:
            {
                text: 'user'
            }
        },
        tooltip:
        {
            valueSuffix: ' (user)'
        },
        plotOptions:
        {
            line:
            {
                marker:
                {
                    enabled: false
                }
            }
        },
        legend:
        {
            layout: 'vertical',
            align: 'right',
            verticalAlign: 'middle',
            borderWidth: 0
        },
        series:
        [
            {
                name: 'CCU',
                data: PHP_PARAMS.default_ccu_view.ccu_values,
                pointStart: PHP_PARAMS.default_ccu_view.ccu_time_start*1000 + 7*60*60*1000,
                pointInterval: PHP_PARAMS.default_ccu_view.ccu_interval*60*1000
            }
        ]
    });
});
